<#assign path = request.getContextPath() />
<!DOCTYPE html>
<html class="x-admin-sm">
    
    <head>
        <meta charset="UTF-8">
        <title>角色添加</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="${path}/static/css/font.css">
        <link rel="stylesheet" href="${path}/static/css/css.css">
		<link rel="stylesheet" type="text/css" href="${path}/static/css/xadmin.css"/>
        <script type="text/javascript" src="${path}/static/lib/layui/layui.js"></script>
        <script type="text/javascript" src="${path}/static/js/xadmin.js"></script>
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row">
                  <div class="layui-form-item">
                      <label for="username" class="layui-form-label">角色名称</label>
                      <div class="layui-input-inline">
                          <input type="text" id="username" name="username" required="" class="layui-input">
                      </div>
                  </div>
				   <div class="layui-form-item">
				      <label for="username" class="layui-form-label">选择菜单角色 </label>
						<select name="" class="layui-select">
							<option value="">开发</option>
							<option value="">测试</option>
						</select>
						<!-- <p>菜单权限即列出所有菜单，可复选</p> -->
				  </div>
				  
                  <div class="layui-form-item">
                      <label for="L_repass" class="layui-form-label"></label>
                      <button  class="btn" lay-filter="keep" lay-submit="">保存</button>
                      <button  class=" btn-nobg" lay-filter="reset" lay-submit="reset">重置</button>
                  </div>
            </div>
        </div>
        <script>
                //监听提交
                form.on('submit(keep)',
                function(data) {
                    console.log(data);
                    //发异步，把数据提交给php
                    layer.alert("保存成功", {
                        icon: 6
                    },
                    function() {
                        //关闭当前frame
                        xadmin.close();

                        // 可以对父窗口进行刷新 
                        xadmin.father_reload();
                    });
                    return false;
                });

				 form.on('submit(reset)',
				function(data) {
				    console.log(data);
				    //发异步，把数据提交给php
				    layer.alert("重置成功", {
				        icon: 6
				    },
				    function() {
				        //关闭当前frame
				        xadmin.close();
				
				        // 可以对父窗口进行刷新 
				        xadmin.father_reload();
				    });
				    return false;
				});
            });</script>
        
    </body>

</html>
